﻿# 简单复利计算.py

principal = 100     #初始金额
rate = 0.05         # 利率
numyears = 5        # 年限
year = 1

while year <= numyears:
	principal = principal * (1 + rate)
	print (year,principal)
	year += 1